<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='ttblsjxt'/></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
    <style>
        html {
            background: #fff;
        }
    </style>
</head>

<body>
<div class="layui-container">
    <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">

        <form:form commandName="groupBooking" class="layui-form" id="form">
            <form:hidden path="id"/>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend><fmt:message key='jbxx'/></legend>
            </fieldset>


            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='ptbh'/></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.groupBookingNo}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='spmc'/></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.sku.goods.name}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='ptjg'/></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.sku.groupBookingPrice}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='tzmc'/></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.member.nickname}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='sjhm'/></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.member.mobile}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='ktsj'/></label>
                <div class="layui-form-mid layui-word-aux">
                    <fmt:formatDate value="${groupBooking.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='ctrs'/></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.groupBookingCondition}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='sjctrs'/></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.groupBookingTotal}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='ctzt'/></label>
                <div class="layui-form-mid layui-word-aux">
                    <c:choose>
                        <c:when test="${groupBooking.status eq 1}"><fmt:message key='ptz'/></c:when>
                        <c:when test="${groupBooking.status eq 2}"><fmt:message key='ptcg'/></c:when>
                        <c:when test="${groupBooking.status eq 3}"><fmt:message key='ptsb'/></c:when>
                    </c:choose>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='ctzt'/></label>
                <div class="layui-form-mid layui-word-aux">
                        ${(groupBooking.groupBookingTotal ==  groupBooking.groupBookingCondition) ? '是' : '否'}
                </div>
            </div>

            <div class="layui-form-item attributeArea">
                <label class="layui-form-label"> <fmt:message key='ctxq'/></label>
                <div class="layui-input-block">
                    <table class="layui-table" lay-size="sm" id="feijin-sku-table">
                        <thead>
                        <th><fmt:message key='xh'/></th>
                        <th><fmt:message key='ctbh'/></th>
                        <th><fmt:message key='ctnc'/></th>
                        <th><fmt:message key='sjh'/></th>
                        <th><fmt:message key='ctsj'/></th>

                        </thead>
                        <tbody>
                        <c:forEach items="${groupBooking.details}" var="item" varStatus="index">

                            <tr>
                                <td>${index.index + 1}</td>
                                <td>${item.orderNo}</td>
                                <td>${item.member.nickname}</td>
                                <td>${item.member.mobile}</td>
                                <td><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>


                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>

        </form:form>
    </div>
</div>

<script>

    $(function () {

        layui.use(['form', 'laydate'], function () {

            var form = layui.form;
            var laydate = layui.laydate;

        });
    });
</script>
</body>
</fmt:bundle>
</html>